<?php
/**
 * Created by PhpStorm.
 * User: 清行
 * Date: 2019/3/18
 * Time: 23:56
 */

namespace xiaokang;

class View extends \Smarty
{

    protected $data;

    static public $smarty;

    function __construct()
    {
        parent::__construct();
        $this->setTemplateDir(V_PATH); //设置模板目录
        $this->setCompileDir(CACHE_PATH . 'templates_c/');
        $this->setConfigDir(CONF_DIR . 'smarty_configs/');
        $this->setCacheDir(CACHE_PATH . 'smarty_cache/');
    }

//    public function assign($key, $value)
//    {
//        $this->data[$key] = $value;
//    }
//
//    public function display($file = '')
//    {
//        echo $file = BASEDIR.'\\templates\\'.$file.'.php';
//
//        if (!empty($file))
//        {
////           $file = BASEDIR.'\\templates\\'.$file.'.php';
//            dump($this->data);
//            extract($this->data);
//           include $file;
//        }
//    }




}